<template>
	<view class="My">
		<!-- @changToken="newToken" -->
		<myLogin v-if="!token" :tokens="token" ></myLogin>
		<!-- @clsToken="clsToken" -->
		<myUserinfo v-else :tokens="token" ></myUserinfo>
	</view>
</template>

<script>
	import myLogin from '../../components/my_login/my_login.vue'
	import myUserinfo from '../../components/my_userinfo/my_userinfo.vue'
	import {
		mapState,
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		data() {
			return {
				// token: ''
			};
		},
		components: {
			myLogin,
			myUserinfo
		},
		computed: {
			...mapState('m_user', ['token'])
		},
		methods: {
			// newToken(val) {
			// 	this.token = val
			// },
			// clsToken(val) {
			// 	this.token = val
			// }
		}
	}
</script>

<style lang="scss">

</style>
